<%@ page language="java" contentType="text/html; charset=UTF-8"
    pageEncoding="UTF-8"%>
 <%
	String path = request.getContextPath();
	String basePath = request.getScheme() + "://" + request.getServerName() + ":" + request.getServerPort()
			+ path + "/";
%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"%>
<!DOCTYPE html>
<html>
		<link rel="stylesheet" href="https://cdn.staticfile.org/twitter-bootstrap/3.3.7/css/bootstrap.min.css">
		<script src="https://cdn.staticfile.org/jquery/2.1.1/jquery.min.js"></script>
		<script src="https://cdn.staticfile.org/twitter-bootstrap/3.3.7/js/bootstrap.min.js"></script>

<script type="text/javascript" src="<%=basePath%>Js/jquery.js"></script>
<link rel="stylesheet" type="text/css" href="<%=basePath%>css/mycss/bootstrap.min.css" />
<head>
<meta charset="UTF-8">
<title>Insert title here</title>
</head>
<script type="text/javascript">
function selectWare(){
	
	var executor = "";
	var product = "";
	var classify = "";
	
	executor = $("#executor").val();   //获取input的值
	product = $("#product").val();   
	classify = $("#classify").val();   
	
	var selectText = $("#select_id").find("option:selected").text();//获取下拉框的值
	
	window.location.href="selectWarehouseRecord.do?executor="+executor+"&product="+product+"&classify="+classify+"&selectText="+selectText;
	
}

</script>

<body>
<hr><h3 align="center">出入库记录</h3><hr>

<div>

<span>类型选择：</span>
                <select name="select_name" id="select_id" class="bg-success">
				
				  <option value="0">----默认----</option>

		          <option value="1">----出库----</option>

		          <option value="2">----入库----</option>
	           </select>
	           
	           <span>执行人：</span>
	            <input type="text" class="" id="executor" placeholder="请输入执行人">
	            
	            <span>商品名称：</span>
	            <input type="text" class="" id="product" placeholder="请输入商品名称">
	            
	            <span>商品分类：</span>
	            <input type="text" class="" id="classify" placeholder="请输入商品分类">
	            
	            <button type="button" onclick="selectWare()" class="btn btn-success">查询</button>

</div><br>

<table class="table table-bordered">
<tr><th>商品名称</th><th>商品分类</th><th>入库或出库</th><th>时间</th><th>单价</th><th>数量</th><th>执行人</th><th>备注</th></tr>
<c:forEach items="${pageInfo.list}" var="list">
<tr><td>${list.product}</td><td>${list.classify}</td><td>${list.nature}</td><td>${list.reserved3}</td><td>${list.price}</td><td>${list.quantity}</td><td>${list.reserved2}</td><td>${list.remark}</td></tr>

</c:forEach>
</table>

         <c:if test="${inf eq null}">
		<div id="page1">
	<c:if test="${!pageInfo.isFirstPage }">
					<a href="${pageContext.request.contextPath }/queryWarehouseRecordAll.do">首页</a>
					<a href="${pageContext.request.contextPath }/queryWarehouseRecordAll.do?pageNum=${pageInfo.prePage}">上一页</a>
				</c:if>
				<c:if test="${!pageInfo.isLastPage }">
				<a href="${pageContext.request.contextPath }/queryWarehouseRecordAll.do?pageNum=${pageInfo.nextPage}">下一页</a>
				<a href="${pageContext.request.contextPath }/queryWarehouseRecordAll.do?pageNum=${pageInfo.lastPage}">末页</a>
				</c:if>
				当前页：${pageInfo.pageNum }/${pageInfo.pages }.
				</div>
		</c:if>
		
		<c:if test="${!(inf eq null)}">
		
				<div id="page1">
	<c:if test="${!pageInfo.isFirstPage }">
					<a href="${pageContext.request.contextPath }/selectWarehouseRecord.do?executor=${executor}&product=${product}&classify=${classify}&selectText=${selectText}">首页</a>
					<a href="${pageContext.request.contextPath }/selectWarehouseRecord.do?pageNum=${pageInfo.prePage}&executor=${executor}&product=${product}&classify=${classify}&selectText=${selectText}">上一页</a>
				</c:if>
				<c:if test="${!pageInfo.isLastPage }">
				<a href="${pageContext.request.contextPath }/selectWarehouseRecord.do?pageNum=${pageInfo.nextPage}&executor=${executor}&product=${product}&classify=${classify}&selectText=${selectText}">下一页</a>
				<a href="${pageContext.request.contextPath }/selectWarehouseRecord.do?pageNum=${pageInfo.lastPage}&executor=${executor}&product=${product}&classify=${classify}&selectText=${selectText}">末页</a>
				</c:if>
				当前页：${pageInfo.pageNum }/${pageInfo.pages }.
				</div>
		
		</c:if>

	


</body>
</html>